<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <title>注册成功 - EasyBlog博客</title>
    <th:block th:replace="~{ fragment/common::common_head}" />
</head>
<body >

<!--导航-->
<div th:replace="~{nav :: navbar}"></div>

<br>
<br>
<br>

<div class="m-container-small m-padded-tb-massive">
    <div class="ui success message m-padded-tb-huge">
        <div class="ui contianer">
            <h2>注册成功</h2>
            <p>恭喜您注册成功，页面将于<strong><span id="time" style="font-size: 22px"></span></strong>秒后跳转到登录页面。
                <a href="#" th:href="@{/user/login.html}" style="font-size: 16px">
                    <button class="ui button tiny blue" >立即登录</button>
                </a>
            </p>
        </div>
    </div>
</div>


<div style="margin-top: 18.5em"></div>

<!--footer-->
<div th:replace="~{fragment/common :: footbar}"></div>

<th:block th:replace="~{fragment/common :: common_js}"/>

<script type="text/javascript">
    let t = 5;
    $(document).ready(function () {
        $('.ui.dropdown').dropdown({
            on: 'hover'
        });
        timer();
    });

    function timer() {
        if (t >0) {
            $('#time').css("color", "#d0393f").text(t);
            t--;
        } else {
            //跳转到登录页面
            window.location.href = "/user/login.html";
        }
        setTimeout("timer()", 1000);
    }

</script>
</body>
</html>